<?php
/**
{
    "courseId": "INT //课程编号@search; ",
    "courseName": "VARCHAR //课程名称@search; ",
    "courseMainId": "INT //课程主类@foreign::tbl_course_main; @search; ",
    "courseSub": "INT //课程子类@foreign::tbl_course_sub; @search; ",
    "cityIdOk": "INT //城市@foreign::tbl_city; @noEdit; @noList; ",
    "districtId": "INT //区@foreign::tbl_district; @noList; @noView; ",
    "location": "VARCHAR //上课地址@noList; ",
    "courseLogo": "VARCHAR //照片@noList; @noEdit; ",
    "uploadImg": "VARCHAR //课程照片300x300@image; @noList; ",
    "minAge": "INT //最小年龄@noList; ",
    "maxAge": "INT //最大年龄@noList; ",
    "age": "VARCHAR //适合年龄@noList; ",
    "courseBaseId": "VARCHAR //适用基础@foreign::tbl_course_base; @search; @noList; ",
    "coursePeopleId": "INT //上课人数@foreign::tbl_course_people; @noList; ",
    "totalClassHours": "VARCHAR //总课时@noList; ",
    "week": "VARCHAR //上课日期<br>1-7表示一周@json; @noList; ",
    "startTime": "VARCHAR //开始上课时间@noList; ",
    "endTime": "VARCHAR //结束上课时间@noList; ",
    "duration": "VARCHAR //时长(分钟)@noList; ",
    "schoolId": "INT //机构@foreign::tbl_school; @search; ",
    "schoolBrandId": "INT //品牌@search; @foreign::tbl_school_brand; @noList; ",
    "schoolCount": "INT //机构数@noList; @noEdit; ",
    "oldPrice": "DECIMAL //原价@noList; ",
    "price": "DECIMAL //售价",
    "buyCount": "INT //销量@noLoad; ",
    "testClass": "TINYINT //体验课@status; 0::不体验::@admin; 1::免费体验::@admin; @noList; ",
    "summary": "TEXT //课程简介@search; @noList; ",
    "totalScore": "FLOAT //总评分@noList; @noEdit; ",
    "schoolScore": "FLOAT //机构得分@noLoad; @noList; ",
    "effectScore": "FLOAT //效果满意度@noList; @noEdit; ",
    "serviceScore": "FLOAT //老师评分@noLoad; @noList; @noEdit; ",
    "scoreCount": "INT //评分数@noList; @noEdit; ",
    "created": "DATETIME //创建时间@noList; ",
    "ip": "VARCHAR //ip@noList; @noEdit; ",
    "uid": "INT //上报人@foreign::tbl_user; @noList; @search; ",
    "sort": "INT //排序@noList; ",
    "want": "INT //想学人数@noLoad; @noList; ",
    "learned": "INT //学过人数@noLoad; @noList; ",
    "lng": "DECIMAL //经度@noList; @delete; @noLoad; @noEdit; ",
    "lat": "DECIMAL //纬度@noList; @delete; @noLoad; @noEdit; ",
    "geo": "VARCHAR //geohash@noList; @delete; @noLoad; @noEdit; ",
    "status": "TINYINT //状态@status; 0::待审核; 3::审核通过::@admin; 4::审核不通过::@admin; 5::下线; 88::删除; @noLoad; @search; "
}
 */

class Course extends Base
{
    
	public $courseId= '';//课程编号@search;
	public $courseName= NULL;//课程名称@search;
	public $courseMainId= "0";//课程主类@foreign::tbl_course_main;@search;
	public $courseSub= "0";//课程子类@foreign::tbl_course_sub;@search;
	public $cityIdOk= "0";//城市@foreign::tbl_city;@noEdit;@noList;
	public $districtId= "0";//区@foreign::tbl_district;@noList;@noView;
	public $location= NULL;//上课地址@noList;
	public $courseLogo= NULL;//照片@noList;@noEdit;
	public $uploadImg= NULL;//课程照片300x300@image;@noList;
	public $minAge= "-1";//最小年龄@noList;
	public $maxAge= "-1";//最大年龄@noList;
	public $age= NULL;//适合年龄@noList;
	public $courseBaseId= "0";//适用基础@foreign::tbl_course_base;@search;@noList;
	public $coursePeopleId= "0";//上课人数@foreign::tbl_course_people;@noList;
	public $totalClassHours= NULL;//总课时@noList;
	public $week= [];//上课日期<br>1-7表示一周@json;@noList;
	public $startTime= NULL;//开始上课时间@noList;
	public $endTime= NULL;//结束上课时间@noList;
	public $duration= NULL;//时长(分钟)@noList;
	public $schoolId= "0";//机构@foreign::tbl_school;@search;
	public $schoolBrandId= "0";//品牌@search;@foreign::tbl_school_brand;@noList;
	public $schoolCount= "1";//机构数@noList;@noEdit;
	public $oldPrice= "0.00";//原价@noList;
	public $price= "0.00";//售价
	public $buyCount= "0";//销量@noLoad;
	public $testClass= "0";//体验课@status;0::不体验::@admin;1::免费体验::@admin;@noList;
	public $summary= '';//课程简介@search;@noList;
	public $totalScore= "0";//总评分@noList;@noEdit;
	public $schoolScore= "0";//机构得分@noLoad;@noList;
	public $effectScore= "0";//效果满意度@noList;@noEdit;
	public $serviceScore= "0";//老师评分@noLoad;@noList;@noEdit;
	public $scoreCount= "0";//评分数@noList;@noEdit;
	public $created= 'CURRENT_TIMESTAMP';//创建时间@noList;
	public $ip= NULL;//ip@noList;@noEdit;
	public $uid= "0";//上报人@foreign::tbl_user;@noList;@search;
	public $sort= "0";//排序@noList;
	public $want= "0";//想学人数@noLoad;@noList;
	public $learned= "0";//学过人数@noLoad;@noList;
	public $lng= "0.0000000";//经度@noList;@delete;@noLoad;@noEdit;
	public $lat= "0.0000000";//纬度@noList;@delete;@noLoad;@noEdit;
	public $geo= NULL;//geohash@noList;@delete;@noLoad;@noEdit;
	public $status= "3";//状态@status;0::待审核;3::审核通过::@admin;4::审核不通过::@admin;5::下线;88::删除;@noLoad;@search;

    public $isDbData = false;

    public function __construct()
    {
        parent::__construct();
    }


    public function __get($name) {
        return $this->$name;
    }

    public function __set($name, $value) {
        if(!$this->isDbData){
            if(!in_array($name,$this->loadedFiled))$this->loadedFiled[] = $name;
        }

        $this->$name=$value;
        $this->arr[$name] = $value;
    }

    public  function table()
    {
        return 'tbl_course';
    }
    
    public  function key(){
        return 'courseId';
    }


    
    public static  function hideField()
    {
        return [];
    }
            
    public static  function skipField()
    {
        return [];
    }
            
    public static  function noViewField()
    {
        return array (  0 => 'districtId',);
    }
            
    public static  function jsonField()
    {
        return array (  0 => 'week',);
    }
            
    public static  function noLoadField()
    {
        return array (  0 => 'buyCount',  1 => 'schoolScore',  2 => 'serviceScore',  3 => 'want',  4 => 'learned',  5 => 'lng',  6 => 'lat',  7 => 'geo',  8 => 'status',);
    }
            
    public static  function deleteField()
    {
        return array (  0 => 'lng',  1 => 'lat',  2 => 'geo',);
    }
            
    public function className()
    {
        return 'Course';
    }
    
    public  function field()
    {
        return array (  'courseId' =>   array (    0 => 'INT',    1 => 11,    2 => '课程编号@search;',  ),  'courseName' =>   array (    0 => 'VARCHAR',    1 => 100,    2 => '课程名称@search;',  ),  'courseMainId' =>   array (    0 => 'INT',    1 => 11,    2 => '课程主类@foreign::tbl_course_main;@search;',  ),  'courseSub' =>   array (    0 => 'INT',    1 => 11,    2 => '课程子类@foreign::tbl_course_sub;@search;',  ),  'cityIdOk' =>   array (    0 => 'INT',    1 => 11,    2 => '城市@foreign::tbl_city;@noEdit;@noList;',  ),  'districtId' =>   array (    0 => 'INT',    1 => 11,    2 => '区@foreign::tbl_district;@noList;@noView;',  ),  'location' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '上课地址@noList;',  ),  'courseLogo' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '照片@noList;@noEdit;',  ),  'uploadImg' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '课程照片300x300@image;@noList;',  ),  'minAge' =>   array (    0 => 'INT',    1 => 11,    2 => '最小年龄@noList;',  ),  'maxAge' =>   array (    0 => 'INT',    1 => 11,    2 => '最大年龄@noList;',  ),  'age' =>   array (    0 => 'VARCHAR',    1 => 255,    2 => '适合年龄@noList;',  ),  'courseBaseId' =>   array (    0 => 'VARCHAR',    1 => 200,    2 => '适用基础@foreign::tbl_course_base;@search;@noList;',  ),  'coursePeopleId' =>   array (    0 => 'INT',    1 => 11,    2 => '上课人数@foreign::tbl_course_people;@noList;',  ),  'totalClassHours' =>   array (    0 => 'VARCHAR',    1 => 100,    2 => '总课时@noList;',  ),  'week' =>   array (    0 => 'VARCHAR',    1 => 1024,    2 => '上课日期<br>1-7表示一周@json;@noList;',  ),  'startTime' =>   array (    0 => 'VARCHAR',    1 => 20,    2 => '开始上课时间@noList;',  ),  'endTime' =>   array (    0 => 'VARCHAR',    1 => 20,    2 => '结束上课时间@noList;',  ),  'duration' =>   array (    0 => 'VARCHAR',    1 => 200,    2 => '时长(分钟)@noList;',  ),  'schoolId' =>   array (    0 => 'INT',    1 => 11,    2 => '机构@foreign::tbl_school;@search;',  ),  'schoolBrandId' =>   array (    0 => 'INT',    1 => 11,    2 => '品牌@search;@foreign::tbl_school_brand;@noList;',  ),  'schoolCount' =>   array (    0 => 'INT',    1 => 11,    2 => '机构数@noList;@noEdit;',  ),  'oldPrice' =>   array (    0 => 'DECIMAL',    1 => 15,    2 => '原价@noList;',  ),  'price' =>   array (    0 => 'DECIMAL',    1 => 15,    2 => '售价',  ),  'buyCount' =>   array (    0 => 'INT',    1 => 11,    2 => '销量@noLoad;',  ),  'testClass' =>   array (    0 => 'TINYINT',    1 => 4,    2 => '体验课@status;0::不体验::@admin;1::免费体验::@admin;@noList;',  ),  'summary' =>   array (    0 => 'TEXT',    1 => 0,    2 => '课程简介@search;@noList;',  ),  'totalScore' =>   array (    0 => 'FLOAT',    1 => 0,    2 => '总评分@noList;@noEdit;',  ),  'schoolScore' =>   array (    0 => 'FLOAT',    1 => 0,    2 => '机构得分@noLoad;@noList;',  ),  'effectScore' =>   array (    0 => 'FLOAT',    1 => 0,    2 => '效果满意度@noList;@noEdit;',  ),  'serviceScore' =>   array (    0 => 'FLOAT',    1 => 0,    2 => '老师评分@noLoad;@noList;@noEdit;',  ),  'scoreCount' =>   array (    0 => 'INT',    1 => 11,    2 => '评分数@noList;@noEdit;',  ),  'created' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '创建时间@noList;',  ),  'ip' =>   array (    0 => 'VARCHAR',    1 => 15,    2 => 'ip@noList;@noEdit;',  ),  'uid' =>   array (    0 => 'INT',    1 => 11,    2 => '上报人@foreign::tbl_user;@noList;@search;',  ),  'sort' =>   array (    0 => 'INT',    1 => 11,    2 => '排序@noList;',  ),  'want' =>   array (    0 => 'INT',    1 => 11,    2 => '想学人数@noLoad;@noList;',  ),  'learned' =>   array (    0 => 'INT',    1 => 11,    2 => '学过人数@noLoad;@noList;',  ),  'lng' =>   array (    0 => 'DECIMAL',    1 => 10,    2 => '经度@noList;@delete;@noLoad;@noEdit;',  ),  'lat' =>   array (    0 => 'DECIMAL',    1 => 10,    2 => '纬度@noList;@delete;@noLoad;@noEdit;',  ),  'geo' =>   array (    0 => 'VARCHAR',    1 => 30,    2 => 'geohash@noList;@delete;@noLoad;@noEdit;',  ),  'status' =>   array (    0 => 'TINYINT',    1 => 4,    2 => '状态@status;0::待审核;3::审核通过::@admin;4::审核不通过::@admin;5::下线;88::删除;@noLoad;@search;',  ),);
    }


}